<table width="100%" cellspacing="0" cellpadding="10" border="0" align="center">
<tr>
    <td class="bodyline"><table width="100%" cellspacing="0" cellpadding="0" border="0">
	   <tr>
		  <td>
		     <%= link_to image_tag("styles/subSilver/logo_phpBB.gif", :border => 0, :alt => $system.name+" index", :vspace => 1), :controller => '' %>
		  </td>
		<td align="center" width="100%" valign="middle"><span class="maintitle"><%= $system.name %>
		</span><br /><span class="gen"><%= $system.description %><br />&nbsp; </span>

<table cellspacing="0" cellpadding="2" border="0">
<tr>
<td align="center" valign="top" nowrap="nowrap">
<span class="mainmenu">&nbsp;
<%= link_to image_tag("styles/"+$system.css+"/icon_mini_faq.gif", :size => "12x13", :border => 0, :alt => "FAQ", :hspace => 3)+"FAQ", {:controller => 'faq'}, {:class => 'mainmenu'} %>&nbsp;
<%= link_to image_tag("styles/"+$system.css+"/icon_mini_search.gif", :size => "12x13", :border => 0, :alt => "Search", :hspace => 3)+"Search", {:controller => 'search'}, {:class => 'mainmenu'} %>&nbsp;
<%= link_to image_tag("styles/"+$system.css+"/icon_mini_members.gif", :size => "12x13", :border => 0, :alt => "Memberlist", :hspace => 3)+"Memberlist", {:controller => 'user', :action => 'list'}, {:class => 'mainmenu'} %>&nbsp;
<%= link_to image_tag("styles/"+$system.css+"/icon_mini_groups.gif",  :size => "12x13", :border => 0, :alt => "Usergroups", :hspace => 3)+"Usergroups", {:controller => 'group', :action => 'list'}, {:class => 'mainmenu'} %>&nbsp;
<%= link_to image_tag("styles/"+$system.css+"/icon_mini_register.gif",  :size => "12x13", :border => 0, :alt => "Register", :hspace => 3)+"Register", {:controller => 'user', :action => 'signup'}, {:class => 'mainmenu'} %>&nbsp;
</span>
</td>
</tr>
<tr>
    <td height="25" align="center" valign="top" nowrap="nowrap">
    <span class="mainmenu">&nbsp;
    <%= link_to image_tag("styles/"+$system.css+"/icon_mini_profile.gif",  :size => "12x13", :border => 0, :alt => "Profile", :hspace => 3)+"Profile", {:controller => 'profile'}, {:class => 'mainmenu'} %>&nbsp;
    <%= link_to image_tag("styles/"+$system.css+"/icon_mini_message.gif",  :size => "12x13", :border => 0, :alt => "Message", :hspace => 3)+"Log in to check your messages", {:controller => 'messages'}, {:class => 'mainmenu'} %>&nbsp;
    <%= link_to image_tag("styles/"+$system.css+"/icon_mini_login.gif",  :size => "12x13", :border => 0, :alt => "Login", :hspace => 3)+"Log in", {:controller => 'user', :action => 'login'}, {:class => 'mainmenu'} %>&nbsp;
    </span>
    </td>
</tr>
</table>
</td>
</tr>
</table>

<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
	<tr>
	  <td align="left" valign="bottom" colspan="2"><%= link_to @forum.name, {:controller => 'forum', :action => 'show', :id => @forum}, {:class => "maintitle"} %><br />
	  <span class="gensmall">
	  </span></td>
	  <td align="right" valign="bottom" nowrap="nowrap"><span class="gensmall"><b></b></span></td>

	</tr>
	<tr>
	  <td align="left" valign="middle" width="50">
	  <%= link_to image_tag("styles/subSilver/lang_english/post.gif", :border => 0, :alt => "Post new topic"), :action => 'new', :id => @forum %>
	  </td>
	  <td align="left" valign="middle" class="nav" width="100%"><span class="nav">&nbsp;&nbsp;&nbsp;
	  <%= link_to $system.name+" Forum Index", {:controller => ''}, {:class => "nav"} %> -> <%= link_to @forum.name, {:controller => 'forum', :action => 'show', :id => @forum}, {:class => 'nav'}  %></span></td>
	  <td align="right" valign="bottom" class="nav" nowrap="nowrap"><span class="gensmall"><a href="viewforum.php?f=3&amp;mark=topics">Mark all topics read</a></span></td>
	</tr>

</table>

<table border="0" cellpadding="4" cellspacing="1" width="100%" class="forumline">
	<tr>
	  <th colspan="2" align="center" height="25" class="thCornerL" nowrap="nowrap">&nbsp;Topics&nbsp;</th>
	  <th width="50" align="center" class="thTop" nowrap="nowrap">&nbsp;Replies&nbsp;</th>
	  <th width="100" align="center" class="thTop" nowrap="nowrap">&nbsp;Author&nbsp;</th>
	  <th width="50" align="center" class="thTop" nowrap="nowrap">&nbsp;Views&nbsp;</th>

	  <th align="center" class="thCornerR" nowrap="nowrap">&nbsp;Last Post&nbsp;</th>
	</tr>
	<% for topic in @topics %>
	<tr>
	  <td class="row1" align="center" valign="middle" width="20">
	  <%= image_tag("styles/subSilver/folder.gif", :size => "19x18", :alt => "No new posts", :title => "No new posts") %></td>
	  <td class="row1" width="100%"><span class="topictitle">
	  <%= link_to topic.name, {:controller => 'topic', :action => 'show', :id => topic}, {:class => 'topictitle'} %></span>
	  <span class="gensmall"><br />
		</span></td>
	  <td class="row2" align="center" valign="middle"><span class="postdetails"><%=h topic.replies %></span></td>

	  <td class="row3" align="center" valign="middle"><span class="name">
	  <%= link_to topic.author.login, :controller => 'profile', :action => 'show', :id => topic.author.profile %></span></td>
	  <td class="row2" align="center" valign="middle"><span class="postdetails"><%= topic.views %></span></td>
	  <td class="row3Right" align="center" valign="middle" nowrap="nowrap"><span class="postdetails">
	  <%= topic.latest_post.created_at.strftime('%b %d, %Y %I:%M %p') %><br />
	  <%= link_to topic.latest_user.login, :controller => 'profile', :action => 'show', :id => topic.latest_user.profile %>
	   <%= link_to image_tag("styles/subSilver/icon_latest_reply.gif", :alt => "View latest post", :title => "View latest post", :border => 0) %></span></td>
	</tr>
	<% end %>
	<tr>
	  <td class="catBottom" align="center" valign="middle" colspan="6" height="28"><span class="genmed">Display topics from previous:&nbsp;<select name="topicdays"><option value="0" selected="selected">All Topics</option><option value="1">1 Day</option><option value="7">7 Days</option><option value="14">2 Weeks</option><option value="30">1 Month</option><option value="90">3 Months</option><option value="180">6 Months</option><option value="364">1 Year</option></select>&nbsp;

		<input type="submit" class="liteoption" value="Go" name="submit" />
		</span></td>
	</tr>
  </table>
  
   <table width="100%" cellspacing="2" border="0" align="center" cellpadding="2">
	<tr>
	  <td align="left" valign="middle" width="50">
	  <%= link_to image_tag("styles/subSilver/lang_english/post.gif", :border => 0, :alt => "Post new topic"), :action => 'new', :id => @forum %>
	  </td>
	  <td align="left" valign="middle" width="100%"><span class="nav">&nbsp;&nbsp;&nbsp;
	  <%= link_to $system.name+" Forum Index", {:controller => ''}, {:class => "nav"} %> -> <%= link_to @forum.name, {:controller => 'forum', :action => 'show', :id => @forum}, {:class => 'nav'}  %></span></td>

	  <td align="right" valign="middle" nowrap="nowrap"><span class="gensmall">All times are GMT - 5 Hours</span><br /><span class="nav"></span>
		</td>
	</tr>
	<tr>
	
	  <td align="left" colspan="3"><span class="nav"><%= link_to 'Previous page', { :page => @topic_pages.current.previous } if @topic_pages.current.previous %>
    <%= link_to 'Next page', { :page => @topic_pages.current.next } if @topic_pages.current.next %> 
	</span></td>
	</tr>

  </table>
  
